function ImgRoll(ele) {
	this.box = document.querySelector('.' + ele)
	this.imgsBox = this.box.querySelector('.imgsBox')
	this.imgsBox.innerHTML+=this.imgsBox.innerHTML
	this.imgWidth = this.imgsBox.clientWidth / this.imgsBox.children.length
	this.speed = 2
	this.imgsBox.style.left = 0 + 'px'
	this.timer = setInterval(() => {
		let nowLeft = -1 * parseInt(this.imgsBox.style.left) >= this.imgsBox.clientWidth/2 ? 0 : parseInt(this
			.imgsBox.style.left)
		this.imgsBox.style.left = nowLeft - this.speed + "px"
	}, 50)
	this.box.addEventListener("mouseover", () => {
		clearInterval(this.timer)
	})
	this.box.addEventListener("mouseleave", () => {
		this.timer = setInterval(() => {
			let nowLeft = -1 * parseInt(this.imgsBox.style.left) >= this.imgsBox.clientWidth/2 ? 0 :
				parseInt(this.imgsBox.style.left)
			this.imgsBox.style.left = nowLeft - this.speed + "px"
		}, 50)
	})
	
	
}
